package compare_time;

public class TimeComparing {
	
	private int hour1;
	private int hour2;
	private int minute1;
	private int minute2;
	
	public TimeComparing(int h1, int m1, int h2, int m2){
		hour1 = h1;
		hour2 = h2;
		minute1 = m1;
		minute2 = m2;
	}
	
	public String getFirstTime(){
		if(hour1 < hour2){
			return "Time 1 comes first";
		}
		else if (hour1 == hour2){
			if(minute1 < minute2){
				return "Time 1 comes first";
			}
			else if(minute1 == minute2){
				return "Times are the same";
			}
			else
				return "Time 2 comes first";
		}
		else{
			return "Time 2 comes first";
		}
			
	}

}
